package com.example.demo.service;

import com.example.demo.persistence.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by Steven on 14/9/22.
 */
@Controller
public class UserService {
    @Autowired
    UserMapper userMapper;

    @RequestMapping(method = RequestMethod.GET, value = "/test")
    public
    @ResponseBody
    String get(String paramValue, Model model) {

        return userMapper.queryUsers().toString();
    }
}
